﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ForumMaster.Master" AutoEventWireup="true"
    CodeBehind="ThreadReply.aspx.cs" Inherits="FilStartUps.Forum.ThreadReply" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>

<%@ Register Src="../Controls/FilStartUps_PageNav.ascx" TagName="FilStartUps_PageNav"
    TagPrefix="uc1" %>
<asp:Content ID="Nav" ContentPlaceHolderID="MainNav" runat="server">
    <uc1:FilStartUps_PageNav ID="FilStartUps_PageNav1" runat="server" />
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="ContentForumDisplay" runat="server">

    <script type="text/javascript">
        tinyMCE.init({
            // General options
            mode: "textareas",
            theme: "advanced",
            plugins: "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

            // Theme options
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
            theme_advanced_buttons3: "sub,sup,|,charmap,emotions,media,advhr,|,print,|,ltr,rtl",
            theme_advanced_buttons4: "styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",
            theme_advanced_resizing: false,

            // Skin options
            skin: "o2k7",
            skin_variant: "silver",

            // Example content CSS (should be your site CSS)
            content_css: "css/example.css",

            // Drop lists for link/image/media/template dialogs
            template_external_list_url: "js/template_list.js",
            external_link_list_url: "js/link_list.js",
            external_image_list_url: "js/image_list.js",
            media_external_list_url: "js/media_list.js",

            // Replace values for the template plugin
            template_replace_values: {
                username: "Some User",
                staffid: "991234"
            }
        });
    </script>
    <script type="text/javascript">

        //        bkLib.onDomLoaded(function () {
        //            nicEditors.allTextAreas();
        //        });

        $(document).ready(function () {
            $('#tblPreview').hide();
            $('#btnpre').click(function () {
                var preview = tinyMCE.get('<%=txtmsg.ClientID %>').getContent();
                $('#tblPreview').show();
                $('#divPreview').html(preview);
            });

        });
    </script>
    <table>
        <tr>
            <td>
                Subject:<asp:Label ID="lbthreadtitle" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <div id="sample" runat="server">
                </div>
                <asp:TextBox runat="server" TextMode="MultiLine" ID="txtmsg" Height="150px" Width="600px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button runat="server" Text="Reply" ID="btnreply" OnClientClick="submit_text();"
                    OnClick="btnreply_Click" />
                <input type="button" value="Preview" id="btnpre" />
                <asp:Button runat="server" Text="Cancel" ID="btncancel" OnClick="btncancel_Click" />
            </td>
        </tr>
    </table>
    <br />
    <br />
    <table  id="tblPreview" width="100%">
        <tr>
            <td>
                <div id="divPreview">
               
                </div>
            </td>
        </tr>
    </table>
    <asp:Repeater runat="server" ID="rpMessage">
        <HeaderTemplate>
            <br />
            <br />
            <asp:Label runat="server" ID="lbPrevMsgs">Previous messages in the thread:</asp:Label>
            <table style="width: 100%;" cellpadding="12">
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td valign="top" style="width: 120px">
                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "emailaddress") %>'></asp:Label>
                    <br />
                    <asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "dateposted") %>'></asp:Label>
                </td>
                <td>
                    <asp:Literal runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "message") %>'></asp:Literal>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>
